package com.zsrt.java.day20161227.lh.homework.util;

import java.math.BigDecimal;

public class Random2 {
	/**
	 * double类型随机数
	 * @return 返回double类型随机数0.00~0.99
	 */
	public static  double ranDom2(){
		
		double random = Math.random();
		BigDecimal db=new BigDecimal(random);
		random=db.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
		return random;
	}
	
}
